<layout name="./Public/main_layout" />
 
<div class="page-header">

<h2><span class="glyphicon glyphicon-plus-sign glyphicon-head" aria-hidden="true"></span>编辑用户 <small class="pull-right"><a href="" ng-click="changeRoute('/user')" ><span class="glyphicon glyphicon-list-alt glyphicon-head" aria-hidden="true"></span>用户管理</a></small></h2>
  
</div>
 
<form class="form-horizontal" name="CtrlForm" role="form" novalidate="novalidate" ng-submit="submit()" ng-controller='UserAddCtrl' style="margin:0 auto;">
	<div class="form-group has-feedback">
	  <label for="username" class="col-md-3 control-label">用户姓名</label>
	  <div class="col-md-6">
		<div class="input-group">
			<input type="text" class="form-control" id="username" name="username" placeholder="请输入用户姓名" required ng-model='user.username' />
			<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true" ng-show="CtrlForm.username.$dirty && CtrlForm.username.$valid" style="margin-right:40px;"></span>
			<span class="input-group-addon" style="color:red;">必填</span>		
		</div>
	  </div>
	</div>
	
	<div class="form-group has-feedback">
	  <label for="password" class="col-md-3 control-label">密码</label>
	  <div class="col-md-6">
		<div class="input-group">
			<input type="password" class="form-control" id="password" name="password" placeholder="请输入密码" required ng-pattern="/^\w{6,}$/" ng-model='user.password'/>
			<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true" ng-show="CtrlForm.password.$dirty && CtrlForm.password.$valid" style="margin-right:40px;"></span>
			<span class="input-group-addon" style="color:red;">必填</span>		
		</div>
	  </div>
	</div>
	
	<div class="form-group has-feedback">
	  <label for="rePassword" class="col-md-3 control-label">重复密码</label>
	  <div class="col-md-6">
		<div class="input-group">
			<input type="password" class="form-control" id="rePassword" name="rePassword" placeholder="再输一遍密码" required ng-model="user.rePassword"/>
			<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true" ng-show="(user.password==user.rePassword) && (user.rePassword)" style="margin-right:40px;"></span>
			<span class="input-group-addon" style="color:red;">必填</span>		
		</div>
	  </div>
	</div>

	<div class="form-group has-feedback">
	  <label for="status" class="col-md-3 control-label">状态</label>
	  <div class="col-md-6"  ng-init="user.status='1'">
		<label class="radio-inline">
		<input type="radio" value="1" name="status" ng-model='user.status'>启用</label>
		<label class="radio-inline">
		<input type="radio" value="" name="status" ng-model='user.status'>禁用</label>
	  </div>
	</div>	
	
	<div class="form-group has-feedback">
	  <label for="remark" class="col-md-3 control-label">备注</label>
	  <div class="col-md-6">
		<textarea class="form-control" rows="3" id="remark" name="remark" ng-model='user.remark'></textarea>
	  </div>
	</div>
	

   <div class="form-group has-feedback">
      <div class="col-md-offset-3 col-md-6">			
        <button type="submit" class="btn btn-primary" ng-disabled="CtrlForm.$pristine || CtrlForm.$invalid">修改</button>
      </div>
   </div>
</form>